package com.ebrothers.isns.controller;

import android.content.Context;
import android.util.Log;
import android.view.View;

import com.ebrothers.isns.NavigationManager.NavigatedView;
import com.ebrothers.isns.common.Constants;

public final class ViewControllerFactory {
	private static final String TAG = "ViewControllerFactory";

	public static ViewController createController(Context context,
			NavigatedView view, View contentView) {
		if (Constants.LOGD) {
			Log.d(TAG, "****** createController. view=" + view);
		}
		if (NavigatedView.VIEW_QS.equals(view)) {
			return new QsViewController(context, contentView);
		} else if (NavigatedView.VIEW_AS.equals(view)) {
			return new AsViewController(context, contentView);
		} else if (NavigatedView.VIEW_MAP.equals(view)) {
			return new MapViewController(context, contentView);
		}
		return null;
	}
}
